projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9712f35
)
xenconsoled: fix timestamp log
author
Keir Fraser
<keir.fraser@citrix.com>
Tue, 23 Jun 2009 10:27:54 +0000
(11:27 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Tue, 23 Jun 2009 10:27:54 +0000
(11:27 +0100)
timestamp log is broken.
Also, xenconsoled might die with segfault.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
tools/console/daemon/io.c
patch
|
blob
|
history
diff --git
a/tools/console/daemon/io.c
b/tools/console/daemon/io.c
index 11e0950595953a221e04e25c1606d4c0b0f10b3e..67fb22c612e82dd21c9ed5f79e4dda58e7018deb 100644
(file)
--- a/
tools/console/daemon/io.c
+++ b/
tools/console/daemon/io.c
@@
-127,7
+127,7
@@
static int write_with_timestamp(int fd, const char *data, size_t sz,
const char *last_byte = data + sz - 1;
while (data <= last_byte) {
- const char *nl = memchr(data, '\n',
sz
);
+ const char *nl = memchr(data, '\n',
last_byte + 1 - data
);
int found_nl = (nl != NULL);
if (!found_nl)
nl = last_byte;